package com.smart.model;

import com.smart.consts.InfoType;
import com.smart.dao.annotation.Expression;

public class InfoCond extends BaseQueryCond{
	
	@Expression(property="id", operator=">")
	private Long idGt;
	
	@Expression(property="id", operator="<")
	private Long idLe;
	
	/**
	 * 标题
	 */
	@Expression(property="title",operator="like")
	private String title;

	/**
	 * 类型
	 */
	private InfoType type;
	
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	
	public InfoType getType() {
		return type;
	}
	public void setType(InfoType type) {
		this.type = type;
	}
	public Long getIdGt() {
		return idGt;
	}
	public void setIdGt(Long idGt) {
		this.idGt = idGt;
	}
	public Long getIdLe() {
		return idLe;
	}
	public void setIdLe(Long idLe) {
		this.idLe = idLe;
	}
	public String getCacheKeyPart() {
		StringBuilder sb = new StringBuilder();
		sb.append(this.type==null?"":this.type.name())
			.append("-")
			.append(this.idGt)
			.append("-")
			.append(this.idLe)
			.append("-")
			.append(this.title)
			.append("-");
		return sb.toString();
	}
}
